﻿using System.ComponentModel.DataAnnotations;
using LoadIn.Maps.Bing.Services;
using Orchard.ContentManagement;
using Orchard.Environment.Extensions;

namespace LoadIn.Maps.Bing.Models
{
    [OrchardFeature("LoadIn.Maps.Bing")]
    public class BingMapsPart : ContentPart<BingMapsPartRecord>
    {
        [Required]
        public string Latitude
        {
            get { return Record.Latitude; }
            set { Record.Latitude = value; }
        }

        [Required]
        public string Longitude
        {
            get { return Record.Longitude; }
            set { Record.Longitude = value; }
        }

        [Required]
        public int Width
        {
            get { return Record.Width; }
            set { Record.Width = value; }
        }

        [Required]
        public int Height
        {
            get { return Record.Height; }
            set { Record.Height = value; }
        }

        [Required]
        public int Zoom
        {
            get { return Record.Zoom; }
            set { Record.Zoom = value; }
        }

        [Required]
        public string Mode
        {
            get { return Record.Mode; }
            set { Record.Mode = value; }
        }

        public string PinIcon
        {
            get { return Record.PinIcon; }
            set { Record.PinIcon = value; }
        }

        public string PinText
        {
            get { return Record.PinText; }
            set { Record.PinText = value; }
        }

        public string ApiKey
        {
            get;
            set;
        }

        public string MapMode
        {
            get;
            set;
        }
    }
}